﻿@model eShop.Web.Mobile.Models.ShipAddressModel
@{
    Layout = null;
}
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>添加配送地址-@{@WorkContext.ShopConfig.SiteTitle}触屏版</title>
    @Html.Raw(WorkContext.ShopConfig.SEOKeyword)
    @Html.Raw(WorkContext.ShopConfig.SEODescription)
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link href="@{@WorkContext.CSSCDN}/mobile/themes/default/css/base.css" rel="stylesheet" type="text/css">
    <link href="@{@WorkContext.CSSCDN}/mobile/themes/default/css/buy.css" rel="stylesheet" type="text/css">
    <script src="@{@WorkContext.ScriptCDN}/mobile/scripts/jquery.js" type="text/javascript"></script>
    <script src="@{@WorkContext.ScriptCDN}/mobile/scripts/common.js" type="text/javascript"></script>
    <script src="@{@WorkContext.ScriptCDN}/mobile/scripts/region.js" type="text/javascript"></script>
    <script src="@{@WorkContext.ScriptCDN}/mobile/scripts/ucenter.user.js" type="text/javascript"></script>
</head>

<body>
@Html.Partial("_header")
<script type="text/javascript">
    $("#headerTitle").html("添加配送地址");
</script>

<form name="shipAddressForm" action="">
<div class="allCon">
<div class="title">收货人地址</div>

<div class="ADcell">
<div class="ADcellCon">
<span>收货人：</span>
<p><input type="text" name="consignee" class="text" value="" /></p>
</div>
<div class="tip" style="display:block;"></div>
</div>

<div class="ADcell">
<div class="ADcellCon">
<span>手机号：</span>
<p><input type="text" name="mobile" class="text" value="" /></p>
</div>
<div class="tip" style="display:block;"></div>
</div>

<div class="ADcell">
<div class="ADcellCon">
<span>所在省：</span>
<p>
    <select id="provinceId" name="provinceId" class="select" style="width:100%; padding:4px;">
    <option selected="selected" value="-1">请选择</option>
    </select>
</p>
</div>
<div class="tip"></div>
</div>

<div class="ADcell">
<div class="ADcellCon">
<span>所在市：</span>
<p>
    <select id="cityId" name="cityId" class="select" style="width:100%; padding:4px;">
    <option selected="selected" value="-1">请选择</option>
    </select>
</p>
</div>
<div class="tip"></div>
</div>

<div class="ADcell">
<div class="ADcellCon">
<span>所在县：</span>
<p>
    <select id="regionId" name="regionId" class="select" style="width:100%; padding:4px;">
    <option selected="selected" value="-1">请选择</option>
    </select>
</p>
</div>
<div class="tip"></div>
</div>

<div class="ADcell">
<div class="ADcellCon">
<span>详细地址：</span>
<p><input type="text" name="address" class="text" value="" /></p>
</div>
<div class="tip" style="display:block;"></div>
</div>

</div>
<a href="javascript:void(0)" onclick="javascript:addShipAddress()" class="redBt subOrder">提交</a>
</form>

<script type="text/javascript">
    //绑定省列表的改变事件
    $("#provinceId").change(function(){
        var selectedProvinceId = $(this).find("option:selected").val();
        if (selectedProvinceId > 0) {
            $("#regionId").html("<option value='-1'>请选择</option>");
            bindCityList(selectedProvinceId, document.getElementById("cityId"));
        }
    })

    //绑定市列表的改变事件
    $("#cityId").change(function(){
        var selectedCityId = $(this).find("option:selected").val();
        if (selectedCityId > 0) {
            bindCityList(selectedCityId, document.getElementById("regionId"));
        }
    })

    //绑定省列表
    bindProvinceList(document.getElementById("provinceId"), provinceId);

    if (cityId > 0) {
        bindCityList(provinceId, document.getElementById("cityId"), cityId);
        bindCountyList(cityId, document.getElementById("regionId"), countyId);
    }
</script>

@Html.Partial("_footer")
</body>
</html>
